package org.example.service.serviceImpl;

import org.example.model.Form;
import org.example.repository.FormRepository;
import org.example.service.formService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class formServiceImpl implements formService {
    @Autowired
    private FormRepository formDao;
    @Override
    public void saveFormService(Form form) {
        formDao.saveForm(form);
    }

    @Override
    public Form findFormService(String formName) {
        return formDao.findFormByFormName(formName);
    }

    @Override
    public long updateFormService(Form form) {
        return formDao.updateForm(form);
    }

    @Override
    public void deleteFormService(String formName) {
           formDao.deleteFormByNmae(formName);
    }
}
